<template>
<div class="">
		<div class="">
				请填写下列信息，重置密码链接会发送至您的邮箱
		</div>		
	<el-form autoComplete="on" :model="forgetPasswordForm" :rules="validRules"
		ref="loginForm" label-position="left"
		class="">
		<el-form-item prop="email">
			<el-input name="email" type="text" v-model="forgetPasswordForm.email"
				placeholder="请输入账号邮箱"></el-input>
		</el-form-item>
		<el-form-item prop="valid">
			<el-input name="valid" type="text" 
				placeholder="验证码"></el-input>
		</el-form-item>
			<el-button type="primary" 	
				@click.native.prevent="handleValid"> 立即验证 </el-button>

		</el-row>
	</el-form>
</div>
</template>

<script>
	import { isWscnEmail } from '@/utils/validate';
	export default { 
		name : 'forget-pwd',
		data () {
			return {
				loading : false,
				forgetPasswordForm :{
					email:''
				}
			}
		},
		methods : {
			handleValid () {
			  this.$http.get('http://10.247.3.29:5001/auth/'+this.forgetPasswordForm.email+'/forgetPassword', {
            }).then((response) => {        
                if (response.code === 0) {
                console.log(111111)
                this.$router.push({})	


                } else {
                    console.log(ws)
                }
            }).catch((response) => {
                console.log(response)
            })
			}
		}
	}
</script>